package com.marvels.financial.loan.dao;


import com.github.pagehelper.Page;
import com.marvels.financial.loan.dto.AdjustmentFeeReviewDto;
import com.marvels.financial.loan.dto.McfeAdjustmentFeeDTO;
import com.marvels.financial.loan.dto.PenaltyAdjustConditionDto;
import org.apache.ibatis.annotations.Param;


public interface McfeAdjustmentFeeDao {

	
	/**
	 * 插入费用调整记录
	 * @param record
	 * @return
	 */
    public int insertSelective(McfeAdjustmentFeeDTO record);
    
    
    /**
     * 根据还款计划id查询还款记录
     * @param planId
     * @return
     */
    public Page<McfeAdjustmentFeeDTO> selectListByPlanId(@Param("planId") String planId);
    
    
    /**
     * 查询待审核列表
     * @param planId
     * @return
     */
    public Page<AdjustmentFeeReviewDto> selectReviewList(PenaltyAdjustConditionDto dto);
    
    
    /**
     * 根据还款计划查询处于申请状态的罚息调整
     * @param planId
     * @return
     */
    public int  countApplyingByPlanId(@Param("planId") String planId,@Param("status") String status);
    
    
    /**
     * 查询planId对应的最后一条调整记录
     * @param planId
     * @return
     */
    public McfeAdjustmentFeeDTO selectDtoByPlanId(@Param("planId") String planId);
    
    
    /**
     * 更新费用调整记录
     * @param ccfeAdjustmentFeeDTO
     * @return
     */
    public int updateMcfeAdjustmentFeeDTO(McfeAdjustmentFeeDTO ccfeAdjustmentFeeDTO);
    
    

}